package zsc.ruanc.practicaltraining.model.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import org.hibernate.validator.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 评论回复表
 */
@Data
public class TReply {


  @Min(message = "Id不能为小于0", value = 0)
  @ApiModelProperty(value = "主键", required = false, dataType = "int")
  private Integer id;

  @NotNull(message = "你要回复哪条评论？")
  @Min(message = "commentId不能为小于0", value = 0)
  @ApiModelProperty(value = "评论，外键", required = true, dataType = "int")
  private Integer commentId;


  @ApiModelProperty(value = "回复者名字", required = true, dataType = "string")
  private String fromName;

  @NotBlank(message = "被回复者名字不能为空")
  @ApiModelProperty(value = "被回复者名字", required = true, dataType = "string")
  private String toName;

  @ApiModelProperty(value = "IP地址", required = false, dataType = "string")
  private String ip;


  @ApiModelProperty(value = "点赞数", required = false, dataType = "int")
  private Integer likes;

  @ApiModelProperty(value = "创建时间", required = false, dataType = "Date")
  private Date created;

  @NotBlank(message = "评论内容不能为空")
  @ApiModelProperty(value = "评论内容", required = false, dataType = "string")
  private String content;

  @ApiModelProperty(value = "ip对应的实际地址", required = true, dataType = "String")
  private String address;


}
